Expand description
§Compio
A thread-per-core Rust runtime with IOCP/io_uring/polling. The name comes from “completion-based IO”. This crate is inspired by monoio.
§Quick start
use compio::{fs::File, io::AsyncReadAtExt};
let file = File::open("Cargo.toml").await.unwrap();
let (read, buffer) = file
.read_to_end_at(Vec::with_capacity(1024), 0)
.await
.unwrap();
assert_eq!(read, buffer.len());
let buffer = String::from_utf8(buffer).unwrap();
println!("{}", buffer);
Re-exports§
pub use buf::BufResult;
pub use runtime::event;
event
pub use runtime::time;
time
pub use buf::arrayvec;
arrayvec
pub use buf::bumpalo;
bumpalo
pub use buf::bytes;
bytes
pub use tls::native_tls;
native-tls
pub use tls::rustls;
rustls
Modules§
- Utilities for working with buffers.
- dispatcher
dispatcher
Multithreading dispatcher for compio. - The platform-specified driver. Some types differ by compilation target.
- fs
runtime
Filesystem manipulation operations. - io
io
This crate provides traits and utilities for completion-based IO. - net
runtime
Network related. - process
process
Process library for compio. It is an extension tostd::process
. - quic
quic
QUIC implementation for compio - runtime
runtime
The runtime of compio. - signal
signal
Asynchronous signal handling. - tls
tls
Async TLS streams.